![]() |
GemaCoreLib
The GeMA Core library
|
Base interface class for Process type plugins. More...
#include <gmProcess.h>


Public Member Functions | |
| GmProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. | |
| virtual | ~GmProcess () |
| Virtual destructor. | |
| virtual const char * | pluginCategory () const |
| Returns the plugin category. | |
| virtual bool | loadPrivateData (LuaTable &table) |
| In general, processes dont have any configuration data on the simulation file. | |
| virtual void | printParameters (const GmLogCategory &logger) |
| Asks the process to print all of its parameters using the provided logger. | |
| virtual void | loadFunctions (LuaTable &table)=0 |
| Virtual function that should be implemented by plugins to fill table with the set of functions exported by this process object. | |
| virtual QStringList | functionList () const =0 |
| Returns the set of function names exported by this process object. | |
| int | createProgressStatsItem (GmRunProgressStats *ps, const char *name) |
| Creates the method process item. If needed, also creates the process item. Returns the new item id or -2 on error (uses -2 to report an error, instead of -1, to simplify the logic used to control creation and also to avoid multiple retries on further calls to a process method) | |
Public Member Functions inherited from GmPluginObject | |
| GmPluginObject (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. | |
| virtual | ~GmPluginObject () |
| Destructor. | |
| QString | id () const |
| Returns the object id. | |
| QString | description () const |
| Returns the object description. | |
| QString | pluginTypeName () const |
| Returns the hierarchical type name for the plugin object type. See also pluginName() and pluginType(). | |
| virtual const char * | pluginName () const =0 |
| Returns a string identifying the plugin which implements this object. Should return the SAME string as the one read from the plugin information file in the pluginName field. | |
| virtual const char * | pluginType () const =0 |
| Returns the string identifying the plugin object type. Should return the SAME string as the one read from the plugin information file in the objectTypes table. | |
Protected Member Functions | |
| template<class T > | |
| void | registerFunctions (LuaTable &table, typename GmProcessMethodRedirector< T >::MethodRegistry *methods, bool noProgressStats=false) |
| Helper function to make it very easy to implement loadFunctions() | |
| template<class T > | |
| QStringList | buildFunctionList (typename GmProcessMethodRedirector< T >::MethodRegistry *methods) const |
| Helper function to make it very easy to implement functionList() and keep it consistent with loadFunctions(). | |
Protected Member Functions inherited from GmPluginObject | |
| virtual const GmLogCategory & | logger () const |
| Returns the internal logger used by the plugin to emmit messages. | |
| GmSimulationData * | simulationData () const |
| Returns a reference to the simulation data object keeping global simulation information. | |
Private Attributes | |
| int | _processProgressItem |
| The root progress stats item related to this process. | |
Base interface class for Process type plugins.
| GmProcess::GmProcess | ( | GmSimulationData * | simulation, |
| QString | id, | ||
| QString | description, | ||
| const GmLogCategory & | logger ) |
Constructor.
| simulation | Reference to the simulation object. |
| id | Process id. |
| description | Process description. |
| logger | Plugin logger object used to emmit messages |
|
inlineprotected |
Helper function to make it very easy to implement functionList() and keep it consistent with loadFunctions().
In functionList(), just call this function passing as parameter the same table passed to registerFunctions() by loadFunctions().
|
virtual |
In general, processes dont have any configuration data on the simulation file.
Implements GmPluginObject.
|
inlinevirtual |
Returns the plugin category.
Implements GmPluginObject.
|
virtual |
Asks the process to print all of its parameters using the provided logger.
The default implementation logs the data, as seen through the access interface;
Implements GmPluginObject.
|
inlineprotected |
Helper function to make it very easy to implement loadFunctions()
In loadFuntions(), just define a static table with the name <--> method mapping and call registerFunctions(). See GmpIoProcess::loadFunctions() for an example. Remember that the table must be NULL terminated and static. If noProgressStats is set to true, time statistics will be skipped.